from datetime import date

prod_date = date(2017, 7, 12)
shelf_years = 5


exp_date = date(prod_date.year + shelf_years, prod_date.month, prod_date.day)

print(f"失效日期：{exp_date.year}/{exp_date.month}/{exp_date.day}")